<template>
  <div>
    <input v-model="value" type="text">
    <a v-on:click="test">提交</a>
  </div>
</template>

<script>
export default {
  data () {
    return {
      value: ''
    }
  },
  methods: {
    test () {
      let str = ''
      for (let ch of this.value) {
        str += ch.codePointAt(0).toString(16) + ','
      }
      alert(this.value + str)
    }
  }
}
</script>

<style lang="less" scoped>
input {
  border: solid 1px red;
}
</style>
